<div class="main-content">
	<div class="breadcrumbs" id="breadcrumbs">
		<ul class="breadcrumb">
			<li>
				<i class="icon-home home-icon"></i>
				<a href="#">系统首页</a>
			</li>
			<li class="active">
				活动管理
			</li>
            <li>
				<a href="#">活动管理</a>
			</li>
            <li class="active">
				新增
			</li>
		</ul><!-- .breadcrumb -->
	</div>
	<div class="page-content">
        
        <div class="page-header">
			<h1>新增活动</h1>
		</div>
		<div class="row">
			 <div class="col-xs-12">
				<!-- PAGE CONTENT BEGINS -->

					<form id="usrform" action="<?php echo base_url()."admin/activity/add_discount"?>" method="post">
				    	<div class="box-body" style="display: inline-block;width: 100%">
					        <div class="form-group col-xs-6">
					            <label>活动名称</label><span style="color: #a94442;"><?php echo form_error("discount_name")?></span>
					            <input name="discount_name" type="text" class="form-control" placeholder="输入 ..." value="<?php echo set_value("discount_name")?>" check-type="required">
				            </div>
	                        <div class="form-group col-xs-6">
					            <label>活动条件</label><span style="color: #a94442;"><?php echo form_error("discount_type")?></span>
					            <input name="discount_type" type="text" class="form-control" placeholder="请输入数字" onkeyup="value=value.replace(/[^\d]/g,'') " value="<?php echo set_value("discount_type")?>" check-type="required">
				            </div>
				            <div class="form-group col-xs-6">
					            <label>活动风格</label><span style="color: #a94442;"><?php echo form_error("discount_style")?></span>
					            <input name="discount_style" type="text" class="form-control" placeholder="请输入活动风格" value="<?php echo set_value("discount_style")?>" check-type="required">
				            </div>
				            <div class="form-group col-xs-6">
					            <label>是否限时</label>
					            <select name="limit_type" class="form-control" check-type="required">
		                            <option value="0">不限时</option>
		                            <option value="1">限时</option>
				                </select>
				            </div>
				            <div class="form-group col-xs-6">
					            <label>限时开始</label><span style="color: #a94442;"><?php echo form_error("limit_start")?></span>
					            <input type="text" id="send_time1" class="form-control" name="limit_start" check-type="required"  value="<?php echo set_value("limit_start")?>" />
				            </div>
				            <div class="form-group col-xs-6">
					            <label>限时结束</label><span style="color: #a94442;"><?php echo form_error("limit_end")?></span>
					            <input type="text" id="send_time2" class="form-control" name="limit_end" check-type="required"  value="<?php echo set_value("limit_end")?>" />
				            </div>
			            </div>
			            <div class="clearfix form-actions">
							<div class="col-md-offset-3 col-md-9">
								<button id="btnSubmit" class="btn btn-info" type="submit">
									<i class="icon-ok bigger-110"></i>
									保存
								</button>
	
								&nbsp; &nbsp; &nbsp;
								<a class="btn" href="<?php echo base_url()."admin/activity/coupon"?>">
									<i class="icon-undo bigger-110"></i>
									返回
								</a>
							</div>
						</div>
					</form>
			</div>
		</div><!-- /.row -->
	</div><!-- /.page-content -->
</div><!-- /.main-content -->
<script type="text/javascript">
$("#usrform").validation();
//保存
$("#btnSubmit").on('click',function(event){
  // 2.最后要调用 valid()方法。
  if ($("#usrform").valid()==false){
    return false;
  }
});
</script>
<script type="text/javascript">
$(function () {
    $('#send_time1').datetimepicker({
        format: 'yyyy-mm-dd', 'autoclose': true, minView: 2,language: 'zh-CN'
    });
    $('#send_time2').datetimepicker({
        format: 'yyyy-mm-dd', 'autoclose': true, minView: 2,language: 'zh-CN'
    });
});
</script>